!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        let a=100;
        var b=20;
        var fn=function(){
            console.log(a);   //报错
            console.log(b);   //undefined
            let a=200;
            var b=25;
        }
        fn();
    </script>
</body>
</html>